import { getDict } from "@/api/common";
import { checkStr, uniqueKey } from "@/utils/judge";
import url from "@/axios/url";
const { mesUrl } = url();
let vm = null;
const sendThis = (_this) => {
  vm = _this;
};
export { sendThis };
// 列表头按钮配置
export const operateList = {
  data () {
    const _this = this;
    return {
      operateList: [
        // {
        //   name: $i18n.t("cabinet.accreditBatch"),
        //   type: "primary",
        //   icon: "el-icon-circle-plus-outline",
        //   handleName: "accreditBatch", // 点击时返回的标识
        // }
      ],
    };
  },
};
// 行末按钮配置
export const rowConfig = [
  {
    name: $i18n.t("cabinet.accredit"),
    type: "primary",
    class: "row-btn-primary",
    handleName: "accredit", // 点击时返回的标识
  },
];

// 搜索条件配置
export const searchConfig = {
  data () {
    const _this = this;
    return {
      searchConfig: {
        inline: true,
        formDesc: {
          cabinetSiteId: {
            type: "select",
            label: $i18n.t("cabinet.cabinetArea"),
            prop: {
              value: "value",
              text: "description",
            },
            options: async () => {
              const list = await getDict('cabinet_area');
              return list.data.result;
            },
          },
        },
      },
    };
  },
};


